home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tex / inputs / epigram.tex < prev    next >
Encoding:
Text File  |  1991-05-21  |  740 b   |  21 lines

  1. % From TeXMaG Volume 2, Number 6
  2. % Don Hosek <DHOSEK@HMCVAX.BITNET>
  3. %
  4. \long\def\epigram#1{% We use \long\def to allow the argument
  5.                     % to span several paragraphs.
  6.     \bigskip       % extra space above.
  7.     \setbox0=\hbox{#1} % put the text into a box
  8.     \ifdim\wd0>\critwidth %check the length
  9.          \centerline{\vtop{\hsize=\episize\noindent#1}}
  10.               % If the length is greater than
  11.               % the critical length, make a
  12.               % displayed paragraph
  13.     \else          % otherwise, we just center the text.
  14.          \centerline{\box0}
  15.     \fi
  16.     \smallskip     % extra space for the end.
  17. }
  18.      
  19. \newdimen\critwidth          \critwidth=.75\hsize
  20. \newdimen\episize            \episize=.6\hsize
  21.